Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solution #1603

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

solution #1603

wants to merge 8 commits into from

Conversation

denys2
Copy link

@denys2 denys2 commented Aug 22, 2023

Copy link

@witflash witflash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see a blank page by your DEMO link.
And I don't see your Person component in your PR. Could you check if you successfully commit and push your changes? And check your DEMO, please.

@denys2 denys2 requested a review from witflash August 22, 2023 14:15
This reverts commit c6146ed.
Copy link

@witflash witflash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work!

Let's improve a little bit your code.

src/App.jsx Outdated
<p className="Person__partner">Natasha is my wife</p>
</section>
<Person
className="Person__name"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to use the className prop here because:

  • you don't use this prop in Person component;
  • you have already used this class inside Person JSX.

{
person.isMarried ? (
<p className="Person__partner">
{person.sex === 'm' ? (

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bad practice to use nested ternary operators.
You can separate this logic into two parts. First: create variable const marriedStatus = person.sex === 'm' ? ... : .... Second: use ternary here in JSX:

<p className="Person__partner">{person.isMarried ? marriedStatus : 'I am not married'}</p>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still not fixed, you are duplicating tag <p>
image

@denys2 denys2 requested a review from witflash August 22, 2023 14:55
{
person.isMarried ? (
<p className="Person__partner">
{person.sex === 'm' ? (

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still not fixed, you are duplicating tag <p>
image

@denys2 denys2 requested a review from sTorba24 August 23, 2023 07:47
Copy link

@sTorba24 sTorba24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you push your code?
I don't see any changes after last review, only it :(
image

Copy link

@sTorba24 sTorba24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check comment above

@denys2 denys2 requested a review from sTorba24 August 23, 2023 18:23
Copy link

@maxim2310 maxim2310 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants